package com.huawei.billms.billtype.controller;

import com.huawei.base.BaseRes;
import com.huawei.billms.billtype.dao.BillTypeDao;
import com.huawei.billms.billtype.entity.BillTypeEntity;
import com.huawei.billms.billtype.service.BillTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 黄后林
 * @date 2022-11-04 14:33:43
 * @note 程序员是用代码喂出来的
 */
@RestController
@RequestMapping("billtype")
public class BillTypeController {

    @Autowired
    private BillTypeService service;


    // http://localhost:8083/billtype/all
    @GetMapping("all")
    public BaseRes all(){
        List<BillTypeEntity> list = service.findAll();
        return BaseRes.getSuccess(list);
    }
}
